package com.jichangxiu.generator.entity.dto.edit;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jichangxiu.generator.entity.bo.GenTemplateBo;
import com.jichangxiu.generator.entity.po.GenTemplate;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * EditGenTemplate:
 *
 * @author JiChangXiu
 * @create 2024-06-30 13:31:07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Schema(description = "生成模板表")
@AutoMappers({
        @AutoMapper(target = GenTemplate.class, reverseConvertGenerate = false),
        @AutoMapper(target = GenTemplateBo.class, reverseConvertGenerate = false)
})
public class EditGenTemplate implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Schema(description = "ID")
    private String id;

    /**
     * 编码
     */
    @Schema(description = "编码")
    private String no;

    /**
     * 标识
     */
    @Schema(description = "标识")
    private String code;

    /**
     * 名称
     */
    @Schema(description = "名称")
    private String name;

    /**
     * 模板类型
     */
    @Schema(description = "模板类型")
    private String type;

    /**
     * 模板分类
     */
    @Schema(description = "模板分类")
    private String category;

    /**
     * 模板内容
     */
    @Schema(description = "模板内容")
    private String content;

    /**
     * 分类ID
     */
    @Schema(description = "分类ID")
    private String categoryId;

    /**
     * 顺序
     */
    @Schema(description = "顺序")
    private BigDecimal sort;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 是否启用
     */
    @Schema(description = "是否启用")
    private Integer enabled;

    /**
     * 启用者
     */
    @Schema(description = "启用者")
    private String enabledBy;

    /**
     * 启用时间
     */
    @Schema(description = "启用时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date enabledTime;

}